import request from '@/utils/request'
// 材料
//材料列表
//4.1.17.APP端获取材料库存
export function materialGetMaterialInventoryList(param) {
    return request({
        url: 'rest/material/getMaterialInventoryList',
        method: 'post',
        data: param
    })
}

//4.1.18.APP端材料移库
export function materialMoveMaterial(param) {
    return request({
        url: 'rest/material/moveMaterial',
        method: 'post',
        data: param
    })
}


// 查询材料出库列表
export function getMaterialInWarehouseList(param) {
    return request({
        url: 'rest/materialInWarehouse/getListByLike',
        method: 'post',
        data: param
    })
}

// 通过入库编号查询材料列表
export function getMaterialCode(param) {
    return request({
        url: 'rest/material/getListByInWarehouseCode',
        method: 'post',
        data: param
    })
}

// 材料入库
export function getMaterialSaveEx(param) {
    return request({
        url: 'rest/materialInWarehouse/saveEx',
        method: 'post',
        data: param
    })
}

// 查询材料规格型号
export function getDeviceTypeAttributeList(param) {
    return request({
        url: 'rest/deviceTypeAttribute/list',
        method: 'post',
        data: param
    })
}


// 查询材料出库列表
export function getMaterialOutList(param) {
    return request({
        url: 'rest/materialExWarehouse/getListByLike',
        method: 'post',
        data: param
    })
}

// 查询材料归还列表
export function materialReturnWarehouseGetListByLike(param) {
    return request({
        url: 'rest/materialReturnWarehouse/getListByLike',
        method: 'post',
        data: param
    })
}

// 通过归还编号查询归还详情
export function materialReturnWarehouseGetDetailByReturnWarehouseCode(param) {
    return request({
        url: 'rest/materialReturnWarehouse/getDetailByReturnWarehouseCode',
        method: 'post',
        data: param
    })
}
// 通过出库编号，查询设备列表
export function getMaterialOutCode(param) {
    return request({
        url: 'rest/material/getListByExWarehouseCode',
        method: 'post',
        data: param
    })
}

// 材料出库
export function getMaterialOutSaveEx(param) {
    return request({
        url: 'rest/materialExWarehouse/saveEx',
        method: 'post',
        data: param
    })
}

// 材料归还
export function getMaterialBackSaveEx(param) {
    return request({
        url: 'rest/materialReturnWarehouse/saveEx',
        method: 'post',
        data: param
    })
}


// 一键归还
export function getMaterialBackBatch(param) {
    return request({
        url: 'rest/materialReturnWarehouse/oneButton',
        method: 'post',
        data: param
    })
}